<%@ page language="java" contentType="text/html" session="true" %>
<%@ page import="camel.client.CamelRemote"%>
<%@ page import="java.util.Properties"%>
<%@ page import="javax.naming.InitialContext" %>
<%@ page import="camel.client.ParticipantLoginInfo" %>
<%@ page import="camel.client.SessionTicket"%>
<%@ page import="camel.client.ParticipantLoginInfo"%>

<%
    
    String id = request.getParameter("id");
    String pswd = request.getParameter("pswd");
    String email = request.getParameter("email");
    String tel = request.getParameter("tel");
    String flag = request.getParameter("flag");
    System.out.println("flag"  +  flag);
%>

<%  
        boolean  result = false;
		try {
			
			CamelRemote  remote = (CamelRemote)session.getAttribute("remote");
			
			ParticipantLoginInfo  info = new ParticipantLoginInfo();
			info.setUsername(id);
			info.setPassword(pswd);
			info.setContact1(email);
			info.setContact2(tel);
			
			result = remote.userAdmin(flag,info);
			System.out.println("result :"  +  result);
			
			if (result) {
				out.print("<script> alert('GOOD'); </script>");
			}	
			else {
				out.print("<script> alert('BAD'); </script>");
			}
		
    	} catch (Exception e) {
	    	e.printStackTrace();
	    	out.print("<script language='JavaScript'>");
			out.print("	alert('error');");
			out.print("	document.location.href='about:blank;'");
			out.print("</script>");
    }
%>
